Skip to content

Update Rust crate uniffi to 0.32.0#108

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/uniffi-0.x
Open

Update Rust crate uniffi to 0.32.0#108
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/uniffi-0.x

Conversation

@renovate

@renovate renovate Bot commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
uniffi (source) dependencies minor 0.30.00.32.0

Release Notes

mozilla/uniffi-rs (uniffi)

v0.32.0

Compare Source

⚠️ Breaking Changes ⚠️
  • Kotlin and Python now fail to generate bindings when there are async primary constructors.
    Previously these languages skipped the constructor in this case or generated a constructor that always threw.
    You can get similar behavior by adding the primary constructor to the uniffi.toml excludes list in uniffi.toml (e.g. `excludes = ["MyObject.new"])
  • Ruby: Force named parameters for enum constructors (#​2880)
  • The --config flag now expects a global config file
    rather than a flat uniffi.toml-style override. Old-style files will produce a warning and be ignored.
    See #​2866
  • [ByRef] bytes UDL arguments now map to &[u8] on the Rust side instead of &Vec<u8>. UDL-defined functions whose Rust implementations take &Vec<u8> must change to &[u8]. Proc-macro signatures (fn foo(x: &[u8])) are unchanged. On the Kotlin side, call sites must now pass a direct java.nio.ByteBuffer rather than ByteArray; migrate with ByteBuffer.allocateDirect(arr.size).put(arr).flip(). Swift (Data) and Python (bytes) call sites are unchanged. (#​2878)
  • Reworked the experimental pipeline bindgen code. Any external binding generators using this will
    need to be reworked as well. See #​2787 for
    examples of how this can be done.
What's Fixed
  • Fixed bug that sometimes prevented renaming items inside a submodule #​2792
  • Exempted UniFfiTag from clippy::exhaustive_structs since downstream projects may depend on it #​2809
  • Ruby: Code for all kinds of enums and custom types is now correctly generated #​2880 and #​2891
⚠️ Breaking Changes for external bindings authors ⚠️
  • There's a new GlobalConfig struct for managing config. It replaces BindgenPathsLayer::get_config() method which has been removed. See #​2866.
  • [ByRef] bytes arguments now travel across the FFI as a ForeignBytes (pointer + length) value rather than a RustBuffer. External bindings need to accept the foreign-language byte buffer at the call site and lower it to ForeignBytes for the duration of the call (no copy). (#​2878)
What's New?
  • Global config file support via --config. See the docs.

  • Traits can now be exported with #[uniffi::export(foreign)] for foreign-only implementations, or #[uniffi::export(rust, foreign)] for both Rust and foreign implementations. The with_foreign flag is deprecated in favor of rust, foreign.

  • Recursive enums are now supported. UniFFI automatically detects when enum and record types participate in cycles — self-referential, mutually recursive, or cycling through a record — and generates appropriate bindings: indirect in Swift, forward references in Python (#​2834).

  • Box<T> now automatically implements FFI traits when T implements them, allowing direct use in enum variants and function parameters without NewType wrappers (#​2808)

  • Record fields can now be renamed with the proc-macro name = "new_field_name" attribute (#​2794)

  • Items can be excluded from the generated bindings using uniffi.toml.

  • Added mutable_records configuration option to allow specific records to remain mutable even when generate_immutable_records is enabled (Kotlin and Swift).

  • Kotlin objects now have an uniffiIsDestroyed property that returns true if the Rust reference no longer exists (#​2825)

  • Updated askama version to 0.15.6

  • Custom Types can have docstrings in some languages (#​2853)

  • Ruby: Expose standard Rust traits for generated ruby code (#​2883)

  • Ruby: Add support for sync foreign traits (#​2916)

  • Ruby: Add async support (#​2923)

  • Added zero-copy transfer of &[u8] / [ByRef] bytes arguments from foreign code to Rust. Kotlin (java.nio.ByteBuffer, must be direct), Swift (Data), and Python (bytes-like, buffer protocol) pass byte buffers as pointer + length (ForeignBytes) rather than copying through RustBuffer. Not yet supported on Ruby, and not yet supported in async functions on any language (#​2878).

  • #[uniffi::export(async_runtime = "tokio")] can now be applied to trait exports, wrapping each method's FFI scaffolding future in async_compat::Compat the same way it does for inherent impls and free functions (#​2899).

  • Added support for using HashSet with proc-macros

  • Allow literal number suffix with derive(uniffi::Enum)(#​2926)

All changes in v0.32.0.

v0.31.2

Compare Source

What's Fixed
  • Kotlin: Fixed JNA direct-mapped u8/u16 return values by widening the internal return carrier to Int, which avoids signedness mismatches during checksum validation and other direct-return paths on Android ARM32. (#​2897)
  • Kotlin: Fix async functions that return an external/RustBuffer type
  • Swift: Fixed FfiConverterString silently stripping a leading U+FEFF byte order mark from Rust strings.
  • Swift: Prevent strict concurrency warning with callback interface tables

All changes in v0.31.2.

v0.31.1

Compare Source

What's Fixed
  • Kotlin: Fixed JNA direct-mapped u8/u16 return values by widening the internal return carrier to Int, which avoids signedness mismatches during checksum validation and other direct-return paths on Android ARM32. (#​2897)
  • Kotlin: Fix async functions that return an external/RustBuffer type
  • Swift: Fixed FfiConverterString silently stripping a leading U+FEFF byte order mark from Rust strings.
  • Swift: Prevent strict concurrency warning with callback interface tables

All changes in v0.31.2.

v0.31.0

Compare Source

What's Fixed
  • Swift: Fixed iOS crash when address sanitizer is enabled
    #​2821
  • Swift: Fixed memory link in async code
    #​2854

All changes in v0.31.1.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot force-pushed the renovate/uniffi-0.x branch from e12777a to 02441b0 Compare February 2, 2026 19:13
@renovate renovate Bot force-pushed the renovate/uniffi-0.x branch from 02441b0 to 7729fc5 Compare April 13, 2026 18:48
@renovate renovate Bot force-pushed the renovate/uniffi-0.x branch from 7729fc5 to a0a1055 Compare May 18, 2026 14:47
@renovate renovate Bot force-pushed the renovate/uniffi-0.x branch from a0a1055 to 84dca2f Compare June 17, 2026 19:13
@renovate renovate Bot force-pushed the renovate/uniffi-0.x branch from 84dca2f to f60de49 Compare June 30, 2026 10:51
@renovate renovate Bot changed the title Update Rust crate uniffi to 0.31.0 Update Rust crate uniffi to 0.32.0 Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants